#ifndef _OBJ_LOADER__H
#define _OBJ_LOADER__H

#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

typedef struct {
	float	x;
	float	y;
	float	z;
} vert3f;

typedef struct {
	float	x;
	float	y;
	float	z;
} normal3f;

typedef struct {
	float	u;
	float	v;
} texture2f;

class OBJLoader {
	private:
		ifstream		m_file;	//Variável para leitura do arquivo
		string 			m_line;	//Used to store the line
	
		vector<vert3f>			vertices;		//Vertex Data
	
		vector<normal3f>		normals;		//Normals Data
	
		vector<texture2f>		texture_pos;	//Texture Mapping Information

		vector<vector <int> >	faces;			//Object Faces indices and its info

	public:
		OBJLoader(string file);
		~OBJLoader();

		int parse();
		void list();
};

#endif
